package com.tqhh.meimei.mapper;

import com.tqhh.meimei.model.Tag;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface CategoryMapper {
    @Select("SELECT `name`,slug FROM typecho_metas WHERE mid IN " +
            "(SELECT mid FROM typecho_relationships WHERE cid=#{cid})" +
            " AND type='category'"

    )
    List<Tag> findCategoriesByCid(@Param("cid") Long cid);
}
